1. Field of the Invention
The present invention relates to pattern recognition technology for inspecting a wiring pattern on a printed wiring board, integrated circuit, or the like, and more particularly to a comparison inspection method in which two patterns having the same shape are compared with each other to detect that portion of one pattern which has a state different from the state of a corresponding portion of the other pattern, to recognize that portion as a defect.
2. Description of the Prior Art
In general, when the image of an integrated circuit pattern formed on a photo-mask or other patterns is inspected, it is necessary to prepare a reference image and an image to be inspected. These images are optically superimposed and then compared visually, to find a position where the images are different from each other, thereby detecting the presence of a defect. Accordingly, there arises a problem that, when an operator gets tired, the probability of missing the defect is increased.
In view of the above, a feature comparing method has been developed in which each of the reference image and the to-be-inspected image is delivered from an imaging device in the form of an image signal, and two image signals thus obtained are compared with each other to automatically detect a defect. In this method, however, owing to the possibility of a drawing error in forming a circuit pattern from a designed pattern (namely, reference pattern) and a positioning error of each image, an alignment error of two images is unavoidable. A comparison an inspection apparatus for a two-dimensional image is disclosed in Japanese Patent Application Unexamined Publication No. 59-24361. This apparatus can detect both a defect as large as a circuit pattern and a very small defect, without regarding a complicated, fine, normal circuit pattern itself as a defect when the normal circuit pattern deviates from a reference pattern within an allowable range of alignment error.
In this apparatus, two image signals delivered from a pair of imaging devices are converted into binary signals, and a predetermined memory element connected to inputs of a logical network is used for each of the binary signals so as to detect boundary lines parallel to the coordinate axes of a rectangular coordinate system. In order to detect the boundary lines accurately, it is necessary to use various kinds of memory elements, that is, it is necessary to prepare a memory element for detecting a boundary line which makes an angle of 45.degree. with the coordinate axis and another memory element for detecting a corner portion of a pattern. As a result, there arises a problem that a logical network receiving the contents of each memory element becomes large in scale, that is, the apparatus is required to have large-scale hardware. While, if a complicated pattern is inspected by using only a few kinds of memory elements, some defects will be overlooked, and false information will be provided.
Next, the drawbacks of the prior art will be explained in detail. Let us consider a case where a pattern having only boundary lines parallel to X- and Y-directions (which make right angles with each other) is inspected, for the sake of simplicity. FIG. 8 shows extraction operators necessary for inspecting a pattern by the feature comparing method. Each of the extraction operators shown in FIG. 8 is a kind of memory element. In this case, that irregularity of a two-dimensional pattern which corresponds to two or more pixels, cannot be regarded as a quantization error, but is judged to be a defect. Now, an extraction operator (hereinafter referred to as an "operator") shown in part (a) of FIG. 8 for extracting a boundary line will be explained below, by way of example. The operator is moved on both the reference pattern and the to-be-inspected pattern. When the relations a.sub.1 =a.sub.2, b.sub.1 =b.sub.2 and a.sub.1 .noteq.b.sub.1 are satisfied, it is known that a boundary line parallel to the Y-direction is present in a portion where the operator is placed. The irregularity of pattern corresponding to two or more pixels as shown in part (a) of FIG. 8 is judged to be a defect in the following manner. When the above operator is used on both the to-be-inspected pattern indicated by a solid line in part (a) of FIG. 8 and the reference pattern indicated by a broken line, boundary lines parallel to the Y-direction are detected only in the to-be-inspected pattern. Thus, a pattern portion including the above boundary lines is judged to be a defect. Although only the operator for detecting a boundary line parallel to the Y-direction is shown in part (a) of FIG. 8, an operator for detecting a boundary line parallel to the X-direction is indispensable, and can be formed by revolving the operator shown in part (a) of FIG. 8 through an angle of 90.degree..
However, an isolated defect shown in part (b) of FIG. 8 and corresponding to one pixel cannot be detected by the above operators. Accordingly, an operator shown in part (b) of FIG. 8 for detecting a fine isolated pattern is indispensable. When this operator is placed on a portion of a pattern and the relation a.sub.1 =a.sub.2 =a.sub.3 =b.sub.1 =b.sub.2 =b.sub.3 and one of the relations a.sub.1 .noteq.c.sub.1, a.sub.1 .noteq.c.sub.2 and a.sub.1 .noteq.c.sub.3 are satisfied, it is known that a fine pattern is present in the portion. When this operator is used on both the to-be-inspected pattern indicated by a solid line in part (b) of FIG. 8 and the reference pattern indicated by a broken line, the fine pattern is detected only in the to-be-inspected pattern, and thus is judged to be a defect. However, in a case where a defect having a length of several pixels along a boundary line and a width of one pixel is present in the vicinity of the boundary line as shown in part (c) of FIG. 8, owing to the alignment error of a to-be-inspected pattern and a reference pattern, a boundary line parallel to the X-direction may be extracted from both of these patterns at substantially the same position by the operator for detecting a boundary line parallel to the X-direction, and thus the defect cannot be detected. Accordingly, an operator shown in part (c) of FIG. 8 is indispensable, and can be formed by revolving the operator shown in part (b) of FIG. 8 through an angle of 90.degree.. Further, in a case where the irregularity of a two-dimensional pattern is present at a corner portion thereof as shown in part (d) of FIG. 8, owing to the alignment error of a to-be-inspected pattern and a reference pattern, one boundary line of the irregularity (namely, defect) parallel to the Y-direction and the boundary line of the reference pattern parallel to the Y-direction may be extracted at substantially the same position, and thus the above defect cannot be detected. Accordingly, an operator shown in part (d) of FIG. 8 is indispensable. When this operator is placed on a portion of a pattern, and a relation a.sub.1 =a.sub.2 =a.sub.3 =a.sub.4 =a.sub.5 =a.sub.6 =a.sub.7, a relation b.sub.1 = b.sub.2 =b.sub.3 =b.sub.4 and a relation a.sub.1 .noteq.b.sub.1 are all satisfied, it is known that a corner of the pattern is present at the portion. When the operator is used on both the to-be-inspected pattern indicated by a solid line in part (d) of FIG. 8 and the reference pattern indicated by a broken line, the corner is present only in the reference pattern, and thus a defect at the corner portion of the to-be-inspected pattern can be detected. Four kinds of corners can be present in a pattern, and hence four operators are required to detect these corners. As mentioned above, according to the conventional feature comparing method, eight kinds of operators (namely, two kinds of operators for extracting boundary lines, two kinds of operators for extracting fine patterns, and four kinds of operators for extracting corners) are indispensable. Further, eight logic circuits corresponding to eight kinds of operators are provided for each of a to-be-inspected pattern and a reference pattern, and thus sixteen logic circuits are required to detect the above-mentioned defects. Although patterns having only boundary lines parallel to the X- and Y-directions are shown in FIG. 8, a pattern having a more complicated shape is often formed. In order to inspect such a pattern, it is necessary to enlarge the scale of the inspection apparatus.